package com.jzo2o.customer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jzo2o.customer.model.domain.AgencyCertification;
import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.response.AgencyCertificationAuditResDTO;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 机构认证信息表 Mapper 接口
 * </p>
 *
 * @author itcast
 * @since 2023-09-06
 */
public interface AgencyCertificationMapper extends BaseMapper<AgencyCertification> {





    List<AgencyCertificationAuditResDTO> queryListss(AgencyCertificationAuditPageQueryReqDTO agencyCertificationAuditPageQueryReqDTO);



    @Select("SELECT reject_reason FROM agency_certification")
    List<AgencyCertification> queryInstitutionStaffList();

    @Update("UPDATE agency_certification SET certification_status = #{certificationStatus}, reject_reason = #{rejectReason} WHERE id = #{id}")
    AgencyCertification updateStatusAndReason(Long id, String certificationStatus, String rejectReason);
}
